import {createApp} from 'vue'
import App from './App.vue'
import router from "./router";
import store from "./store";

import 'ant-design-vue/dist/antd.less'

// "@vueuse/core": "^6.8.0",
// import { useIntersectionObserver } from '@vueuse/core'

// import errorImg from './assets/img/ef3cda1cfc1b415148e0509b8d84eeff.jpeg'
// import i18n from "./config/global";


// import {QuillEditor, Quill} from '@vueup/vue-quill'
// import '@vueup/vue-quill/dist/vue-quill.snow.css';
// import '@vueup/vue-quill/dist/vue-quill.bubble.css';

import {
    Row,
    Col,
    InputSearch,
    Button,
    Affix,
    Drawer,
    Tree,
    Breadcrumb,
    Form,
    Radio,
    Checkbox,
    Collapse,
    Descriptions,
    Modal,
    notification,
    Pagination,
    Select,
    Empty,
    Badge,
    InputNumber,
    Spin,
    Skeleton,
    List,
    Table,
    message,
    Steps,
    Result,
    Tooltip,
    ConfigProvider
} from 'ant-design-vue'



// import 'ant-design-vue/lib/grid/style/index.css'
// import 'ant-design-vue/lib/input/style/index.css'
// import 'ant-design-vue/lib/button/style/index.css'
// import 'ant-design-vue/lib/affix/style/index.css'
// import 'ant-design-vue/lib/drawer/style/index.css'
// import 'ant-design-vue/lib/tree/style/index.css'
// import 'ant-design-vue/lib/breadcrumb/style/index.css'
// import 'ant-design-vue/lib/form/style/index.css'
// import 'ant-design-vue/lib/radio/style/index.css'
// import 'ant-design-vue/lib/collapse/style/index.css'
// import 'ant-design-vue/lib/descriptions/style/index.css'
// import 'ant-design-vue/lib/modal/style/index.css'
// import 'ant-design-vue/lib/notification/style/index.css'
// import 'ant-design-vue/lib/pagination/style/index.css'
// import 'ant-design-vue/lib/select/style/index.css'
// import 'ant-design-vue/lib/message/style/index.css'
// import 'ant-design-vue/lib/empty/style/index.css'
// import 'ant-design-vue/lib/input-number/style/index.css'
// import 'ant-design-vue/lib/spin/style/index.css'
// import 'ant-design-vue/lib/skeleton/style/index.css'
// import 'ant-design-vue/lib/list/style/index.css'
// import 'ant-design-vue/lib/steps/style/index.css'
// import 'ant-design-vue/lib/result/style/index.css'
// import 'ant-design-vue/lib/tooltip/style/index.css'
// import 'ant-design-vue/lib/badge/style/index.css'
// import 'ant-design-vue/lib/checkbox/style/index.css'

import basicCard from "./components/card/basicCard.vue";
import goodCard from "./components/card/goodCard.vue";

import basicButton from "./components/button/basicButton.vue";
import basicText from "./components/text/basicText.vue";
import basicInput from "./components/input/basicInput.vue";
import basicNumberInput from "./components/input/basicNumberInput.vue";
import basicList from "./components/list/basicList.vue"
import basicEditor from './components/editor/basicEditor.vue';
import basicEditorNew from './components/editor/basicEditorNew.vue';
import basicCollapse from './components/collapse/basicCollapse.vue';
import basicCollapseItem from './components/collapse/basicCollapseItem.vue';
import {cookiesType, getCookie} from "./utils/cookies";
import {searchLanguage} from "./api/LanguageRequest";


const app = createApp(App)
    .use(router)
    .use(store)
;


app.component(basicCard.name, basicCard)
app.component(goodCard.name, goodCard)


app.component(basicButton.name, basicButton)
app.component(basicText.name, basicText)
app.component(basicInput.name, basicInput)
app.component(basicNumberInput.name, basicNumberInput)
// app.component(basicEditor.name, basicEditor)
// app.component(basicEditorNew.name, basicEditorNew)
app.component(basicCollapse.name, basicCollapse)
app.component(basicList.name, basicList)
app.component(basicCollapseItem.name, basicCollapseItem)
app.component(InputSearch.name, InputSearch)
// app.component('quill-editor', QuillEditor)


app.use(Row);
app.use(Col);
app.use(Button);
app.use(Affix);
app.use(Drawer);
app.use(Tree);
app.use(Breadcrumb);
app.use(Form);
app.use(Radio);
app.use(Collapse);
app.use(Descriptions);
app.use(Modal);
// @ts-ignore
app.use(notification)
app.use(Pagination)
app.use(Select)
app.use(Empty)
app.use(Checkbox)
app.use(Table)
app.use(InputNumber)
app.use(ConfigProvider)
app.use(Spin)
app.use(Skeleton)
app.use(List)
app.use(Steps)
app.use(Result)
app.use(Tooltip)
app.use(Badge)

const config = {
    token: getCookie(cookiesType.token),
    refreshToken: getCookie(cookiesType.refreshToken),
    language: getCookie(cookiesType.languageId),
}
store.commit('SET_CONFIG', config);

app.mount('#app')


export default app;

